"""
@Project : py.flask.excel
@File    : pd.py
@Author  : Liu Hongli
@Time    : 2024/5/28 10:49
"""
import pandas as pd
import numpy as np

df = pd.DataFrame([('bird', 389.0), ('bird', 24.0), ('mammal', 80.5), ('mammal', np.nan)],
                  index=['falcon', 'parrot', 'lion', 'monkey'], columns=['class', 'max_speed'])


print(df)
print('\n')

df1 = df.reset_index()
print(df1)
print('\n')

df2 = df.reset_index(inplace=True)
print(df2)
print('\n')
print(df)

